<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" href="css/bootstrap.min.css" />
  </head>
  
  <body>
    <%@ include file="top.jsp" %>
    <div class="container" style="margin-top:20px">
		<div class="row">
			<div class="span3">
				<div class="well" style="padding: 8px 0;margin-top:60px;" >
					<ul class="nav nav-list">
						<li class="nav-header">${sessionScope.pu.project.name }</li>
						<li>${sessionScope.user.username }:${sessionScope.pu.role }</li>
						<li class="divider"></li>
						<li><a href="project.jspx?id=${sessionScope.pu.projectid }"><i class="icon-home"></i>最新动态</a></li>
						<li><a href="goal.jspx"><i class="icon-flag"></i>目标</a></li>
						<li><a href="document.jspx"><i class="icon-folder-open"></i>资料库</a></li>
						<li ><a href="file.jspx"><i class="icon-file"></i>文件共享</a></li>
						<li class="active"><a href="contact.jspx"><i class="icon-user"></i>联系人</a></li>
						<li><a href="idea.jspx"><i class="icon-fire"></i>想法</a></li>
						<li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
						<li><a href="main.jspx?m=editProject&id=${pu.projectid }"><i class="icon-cog"></i>项目设置</a></li>
					</ul>
				</div>
			</div>
			<div class="span9">
				<form action="contact.jspx?m=addcontact&id=${sessionScope.pu.projectid }"  method="post"  class="form-horizontal" style="margin-top:60px;">
					<fieldset>
						<legend>添加联系人</legend>
						<div class="control-group">
							<label for="input01" class="control-label">姓名</label>
							<div class="controls">
								<input type="text" class="span5" style="height:28px" name="name" id="name"/><span id="cn" style="color:red; font-size:10px; ">必填</span>
							</div>							
						</div>
						<div class="control-group">
							<label for="input01" class="control-label" >公司</label>
							<div class="controls">
								<input type="text" class="span5" style="height:28px" name="company" id="company"/><span id="cc" style="color:red; font-size:10px; ">必填</span>
							</div>							
						</div>
						<hr />
						<div class="control-group">
							<label for="input01" class="control-label">手机</label>
							<div class="controls">
								<input type="text" class="span5" style="height:28px" name="moblie"  id="moblie"/><span id="cm" style="color:red; font-size:10px; ">必填</span>
							</div>							
						</div>
						<div class="control-group">
							<label for="input01" class="control-label">固话</label>
							<div class="controls">
								<input type="text" class="span5" style="height:28px" name="tel"/><span id=""></span>
							</div>							
						</div>
						<div class="control-group">
							<label for="input01" class="control-label">邮箱</label>
							<div class="controls">
								<input type="text" class="span5" style="height:28px" name="email"  id="email"/><span id="ce" style="color:red; font-size:10px; ">必填</span>
							</div>							
						</div>
						<hr />
						<div class="control-group">
							<label for="input01" class="control-label" >地址</label>
							<div class="controls">
								<input type="text" class="span5" style="height:28px" name="address"/>
							</div>							
						</div>
						<hr />
						<div class="control-group">
							<label for="input01" class="control-label" >主页</label>
							<div class="controls">
								<input type="text" class="span5" style="height:28px" name="web"/><span id=""></span>
								<p class="help-block">http://www.xxx.com</p>
							</div>							
						</div>
						<div class="control-group">
							<label for="input01" class="control-label">微博</label>
							<div class="controls">
								<input style="height:28px" class="span5" id="prependedInput" size="16" type="text" id="weibo"><span id="cw"></span>
							</div>							
						</div>
						<div class="control-group">
							<label for="input01" class="control-label">简介</label>
							<div class="controls">
								<textarea cols="30" rows="6" class="span5"  name="cont"></textarea>
							</div>
						</div>
						<div class="form-actions">
							<button type="submit" class="btn btn-primary">保存</button>
						<button class="btn ">	<a href="contact.jspx">返回</a> </button>
						</div>
					</fieldset>
				
				</form>
			
			</div>
		</div>
	</div>
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			
			$("#name").blur(function(){
				var v=$("#name").val();
				if(v.trim().length == 0 ){
					$("#cn").html("不为空");
				}else{
						$("#cn").html("√");
				}
			
			});
			$("#company").blur(function(){
				var v=$("#company").val();
				if(v.trim().length == 0 ){
					$("#cc").html("不为空");
				}else{
					$("#cc").html("√");
				}
			
			});
				$("#moblie").blur(function(){
				var v=$("#moblie").val();
				if(v.trim().length == 0 ){
					$("#cm").html("不为空");
				}else{
					$("#cm").html("√");
				}
			
			});
			$("#email").blur(function(){
				var v=$("#email").val();
				var reg=/^\w+@\w+(\.\w+){1.2}$/;
				if(v.trim().length == 0 ){
					$("#ce").html("不为空");
				}else if(v.match(reg)) {
					$("#ce").html("√");
				}else{
					$("#ce").html("X");
				}
			
			}); 
			$("#weibo").blur(function(){
				var v=$("#weibo").val();
				var reg=/^\w+\.+\w+\\+\w+$/;
				if(v.match(reg) ){
					$("#cw").html("不为空");
				}else{
					$("#cw").html("X");
				}
			
			}); 
			 
				
	
			
			
			
			
		
		
		});
	
	
	</script>	
  </body>
</html>
